﻿using Polaris.Domain.Model.Dto.Notes.Request;
using Polaris.Domain.Model.DtoWebSite.Article.Response;
using Polaris.Domain.Model.DtoWebSite.Notes.Response;
using Polaris.Domain.Model.Entity.Base;
using Polaris.Domain.Model.Enum;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Polaris.Domain.Interfaces.WebSite
{
    public interface IWebArticle
    {
        /// <summary>
        /// 获取闲书 
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<CursorPagedResult<NoteInfoResponse>> GetNewNotes(Guid? id,string fingerprint);

        /// <summary>
        /// 闲书浏览量
        /// </summary>
        /// <param name="id"></param>
        /// <param name="fingerprint"></param>
        /// <returns></returns>
        Task<bool> BrowseNotes(Guid id, string fingerprint);

        /// <summary>
        /// 文章浏览量
        /// </summary>
        /// <param name="id"></param>
        /// <param name="fingerprint"></param>
        /// <returns></returns>
        Task<bool> BrowseArticle(Guid id, string fingerprint);

        /// <summary>
        /// 获取所有文章列表
        /// </summary>
        /// <returns></returns>
        Task<PaginationInfo<ArticleGroupByYearResponse>> GetArticleList(Pagination pageInfo);

        /// <summary>
        /// 根据id和类型获取文章或闲书内容
        /// </summary>
        /// <param name="id"></param>
        /// <param name="articleType"></param>
        /// <returns></returns>
        Task<ArticleContentResponse> GetArticleContentById(string id, ArticleType articleType);

        /// <summary>
        /// 根据id获取文章消息
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<ArticleInfoResponse> GetArticleInfoById(string id,string fingerprint);

        /// <summary>
        /// 获取推荐文章
        /// </summary>
        /// <param name="type">notes/articles</param>
        /// <returns></returns>
        Task<List<RecommendArticleInfoResponse>> GetRecommendArticle(string type);

        /// <summary>
        /// 根据类型获取文章列表
        /// </summary>
        /// <param name="pageInfo"></param>
        /// <param name="type"></param>
        /// <returns></returns>
        Task<PaginationInfo<ArticleGroupByYearResponse>> GetArticleListByType(Pagination pageInfo, ArticleType type);

        /// <summary>
        /// 点赞文章
        /// </summary>
        /// <param name="notesId"></param>
        /// <param name="fingerprint">指纹</param>
        /// <returns></returns>
        Task<bool> LikeNotes(string notesId, string fingerprint);

        /// <summary>
        /// 点赞文章
        /// </summary>
        /// <param name="articleId"></param>
        /// <param name="fingerprint">指纹</param>
        /// <returns></returns>
        Task<bool> LikeArticle(string articleId, string fingerprint);
    }
}
